This example assumes that a 1 kHz frequency is applied at the GPIO10 pin. Limit counter mode is enabled to request the time the pulse counter needs to count a specified number of pulses.
Open pulse counter, enable Limit counter mode, request the time needed to count 1000 pulses. Open pulse counter, enable Limit counter mode, request the time needed to count 2000 pulses. Open pulse counter, enable Limit counter mode, request the time needed to count 10000 pulses. Open pulse counter, enable Limit counter mode, request the time needed to count 20000 pulses.
This example shows how to stop the Limit counter mode and close the pulse counter without waiting for the "^SCCNT" URC. Both methods have the same effect, it is up to you which one to use.
Stop and close the pulse counter immediately, without "^SCCNT" URC being indicated. Stop and close the pulse counter immediately, without "^SCCNT" URC being indicated.
|